import request from '@/utils/request'

export default {
  listAll() {
    return request({
      url: '/order/all',
      method: 'get'
    })
  },
  listPage(currentPage, pageSize, queryOrderDTO) {
    return request({
      url: `/order/search/${currentPage}/${pageSize}`,
      method: 'post',
      data: queryOrderDTO
    })
  },
  deleteOrder(ids) {
    return request({
      url: `/order/delete`,
      method: 'post',
      data: ids
    })
  },
  addOrder(order) {
    return request({
      url: `/order/add`,
      method: 'post',
      data: order
    })
  },
  findById(id) {
    return request({
      url: `/order/${id}`,
      method: 'get'
    })
  },
  updateOrder(order) {
    return request({
      url: `/order/update`,
      method: 'post',
      data: order
    })
  },
}
